Class NtpHeaderImpl

All Implemented Interfaces:
IPCData, NtpHeader, Pdu, Signal

public class NtpHeaderImpl extends PduImpl implements NtpHeader
  • Field Details

    • isNtpServerAuthenticate

      protected boolean isNtpServerAuthenticate
    • hostIpAddress

      protected IPAddress hostIpAddress
    • leapIndicator

      protected int leapIndicator
    • ntpVersion

      protected int ntpVersion
    • mode

      protected ProtocolMode mode
    • stratum

      protected int stratum
    • poll

      protected int poll
    • precision

      protected float precision
    • rootDelay

      protected float rootDelay
    • rootDespersion

      protected float rootDespersion
    • refClockID

      protected int refClockID
    • refClockTime

      protected String refClockTime
    • originateTime

      protected String originateTime
    • receiveTime

      protected String receiveTime
    • transmitTime

      protected String transmitTime
    • srvKeyId

      protected int srvKeyId
    • md5Passwd

      protected String md5Passwd
  • Constructor Details

    • NtpHeaderImpl

      public NtpHeaderImpl()
  • Method Details

    • getIsNtpServerAuthenticate

      public boolean getIsNtpServerAuthenticate()
      Specified by:
      getIsNtpServerAuthenticate in interface NtpHeader
      Returns:
      boolean Returns a boolean
    • setIsNtpServerAuthenticate

      public void setIsNtpServerAuthenticate(boolean isNtpServerAuthenticate)
      Specified by:
      setIsNtpServerAuthenticate in interface NtpHeader
      Parameters:
      isNtpServerAuthenticate - Takes in a parameter of isNtpServerAuthenticate
    • getHostIpAddress

      public IPAddress getHostIpAddress()
      Specified by:
      getHostIpAddress in interface NtpHeader
      Returns:
      IPAddress Returns a IPAddress
    • setHostIpAddress

      public void setHostIpAddress(IPAddress hostIpAddress)
      Specified by:
      setHostIpAddress in interface NtpHeader
      Parameters:
      hostIpAddress - Takes in a parameter of hostIpAddress
    • getLeapIndicator

      public int getLeapIndicator()
      Specified by:
      getLeapIndicator in interface NtpHeader
      Returns:
      int Returns a int
    • setLeapIndicator

      public void setLeapIndicator(int leapIndicator)
      Specified by:
      setLeapIndicator in interface NtpHeader
      Parameters:
      leapIndicator - Takes in a parameter of leapIndicator
    • getNtpVersion

      public int getNtpVersion()
      Specified by:
      getNtpVersion in interface NtpHeader
      Returns:
      int Returns a int
    • setNtpVersion

      public void setNtpVersion(int ntpVersion)
      Specified by:
      setNtpVersion in interface NtpHeader
      Parameters:
      ntpVersion - Takes in a parameter of ntpVersion
    • getMode

      public ProtocolMode getMode()
      Specified by:
      getMode in interface NtpHeader
      Returns:
      ProtocolMode Returns a ProtocolMode
    • setMode

      public void setMode(ProtocolMode mode)
      Specified by:
      setMode in interface NtpHeader
      Parameters:
      mode - Takes in a parameter of mode
    • getStratum

      public int getStratum()
      Specified by:
      getStratum in interface NtpHeader
      Returns:
      int Returns a int
    • setStratum

      public void setStratum(int stratum)
      Specified by:
      setStratum in interface NtpHeader
      Parameters:
      stratum - Takes in a parameter of stratum
    • getPoll

      public int getPoll()
      Specified by:
      getPoll in interface NtpHeader
      Returns:
      int Returns a int
    • setPoll

      public void setPoll(int poll)
      Specified by:
      setPoll in interface NtpHeader
      Parameters:
      poll - Takes in a parameter of poll
    • getPrecision

      public float getPrecision()
      Specified by:
      getPrecision in interface NtpHeader
      Returns:
      float Returns a float
    • setPrecision

      public void setPrecision(float precision)
      Specified by:
      setPrecision in interface NtpHeader
      Parameters:
      precision - Takes in a parameter of precision
    • getRootDelay

      public float getRootDelay()
      Specified by:
      getRootDelay in interface NtpHeader
      Returns:
      float Returns a float
    • setRootDelay

      public void setRootDelay(float rootDelay)
      Specified by:
      setRootDelay in interface NtpHeader
      Parameters:
      rootDelay - Takes in a parameter of rootDelay
    • getRootDespersion

      public float getRootDespersion()
      Specified by:
      getRootDespersion in interface NtpHeader
      Returns:
      float Returns a float
    • setRootDespersion

      public void setRootDespersion(float rootDespersion)
      Specified by:
      setRootDespersion in interface NtpHeader
      Parameters:
      rootDespersion - Takes in a parameter of rootDespersion
    • getRefClockID

      public int getRefClockID()
      Specified by:
      getRefClockID in interface NtpHeader
      Returns:
      int Returns a int
    • setRefClockID

      public void setRefClockID(int refClockID)
      Specified by:
      setRefClockID in interface NtpHeader
      Parameters:
      refClockID - Takes in a parameter of refClockID
    • getRefClockTime

      public String getRefClockTime()
      Specified by:
      getRefClockTime in interface NtpHeader
      Returns:
      String Returns a String
    • setRefClockTime

      public void setRefClockTime(String refClockTime)
      Specified by:
      setRefClockTime in interface NtpHeader
      Parameters:
      refClockTime - Takes in a parameter of refClockTime
    • getOriginateTime

      public String getOriginateTime()
      Specified by:
      getOriginateTime in interface NtpHeader
      Returns:
      String Returns a String
    • setOriginateTime

      public void setOriginateTime(String originateTime)
      Specified by:
      setOriginateTime in interface NtpHeader
      Parameters:
      originateTime - Takes in a parameter of originateTime
    • getReceiveTime

      public String getReceiveTime()
      Specified by:
      getReceiveTime in interface NtpHeader
      Returns:
      String Returns a String
    • setReceiveTime

      public void setReceiveTime(String receiveTime)
      Specified by:
      setReceiveTime in interface NtpHeader
      Parameters:
      receiveTime - Takes in a parameter of receiveTime
    • getTransmitTime

      public String getTransmitTime()
      Specified by:
      getTransmitTime in interface NtpHeader
      Returns:
      String Returns a String
    • setTransmitTime

      public void setTransmitTime(String transmitTime)
      Specified by:
      setTransmitTime in interface NtpHeader
      Parameters:
      transmitTime - Takes in a parameter of transmitTime
    • getSrvKeyId

      public int getSrvKeyId()
      Specified by:
      getSrvKeyId in interface NtpHeader
      Returns:
      int Returns a int
    • setSrvKeyId

      public void setSrvKeyId(int srvKeyId)
      Specified by:
      setSrvKeyId in interface NtpHeader
      Parameters:
      srvKeyId - Takes in a parameter of srvKeyId
    • getMd5Passwd

      public String getMd5Passwd()
      Specified by:
      getMd5Passwd in interface NtpHeader
      Returns:
      String Returns a String
    • setMd5Passwd

      public void setMd5Passwd(String md5Passwd)
      Specified by:
      setMd5Passwd in interface NtpHeader
      Parameters:
      md5Passwd - Takes in a parameter of md5Passwd
    • getFieldType

      public PtmpTypeValue getFieldType(String fieldName)
      Overrides:
      getFieldType in class PduImpl
    • read

      public void read(EncodedBuffer buffer)
      Reads this object from an EncodedBuffer of raw data
      Specified by:
      read in interface IPCData
      Overrides:
      read in class PduImpl
      Parameters:
      buffer - The EncodedBuffer that contains the raw data from which to construct this object
    • pduRead

      public void pduRead(EncodedBuffer buffer)
      Specified by:
      pduRead in interface Signal
      Overrides:
      pduRead in class PduImpl
    • getOrderedFieldNames

      public List<String> getOrderedFieldNames()
      Specified by:
      getOrderedFieldNames in interface Signal
      Overrides:
      getOrderedFieldNames in class PduImpl
    • encodeTypeAndPayload

      public void encodeTypeAndPayload(EncodedBuffer buffer)
      Specified by:
      encodeTypeAndPayload in interface Signal
      Overrides:
      encodeTypeAndPayload in class PduImpl